﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrator/Admincp.Master" AutoEventWireup="true" CodeBehind="Quanlydiadiemtrunggian.aspx.cs" Inherits="Moving03.Administrator.WebForm5" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    &nbsp;
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="form1" runat="server">
    <br />
    &nbsp;&nbsp;&nbsp; <strong style="color: #6666FF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    DANH SÁCH ĐỊA ĐIỂM TRUNG GIAN<br />
    </strong>
    <br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="Id_DDTrungGian" DataSourceID="SqlDataSource1" CellPadding="4" 
        ForeColor="#333333" GridLines="None" Width="80%" style="margin:auto" 
        AllowPaging="True" onrowcommand="GridView1_RowCommand" 
        onrowdeleted="GridView1_RowDeleted" onrowupdated="GridView1_RowUpdated">
    <AlternatingRowStyle BackColor="White" />
    <Columns>
        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" HeaderImageUrl="~/images/edit.gif" />
        <asp:BoundField DataField="Id_DDTrungGian" HeaderText="Mã Đia Điểm" 
            InsertVisible="False" ReadOnly="True" SortExpression="Id_DDTrungGian" />
        <asp:BoundField DataField="TenDiaDiem" HeaderText="Tên Địa Điểm" 
            SortExpression="TenDiaDiem" />
    </Columns>
    <EditRowStyle BackColor="#2461BF" />
    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
    <RowStyle BackColor="#EFF3FB" />
    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    <SortedAscendingCellStyle BackColor="#F5F7FB" />
    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
    <SortedDescendingCellStyle BackColor="#E9EBEF" />
    <SortedDescendingHeaderStyle BackColor="#4870BE" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:UPSConnectionString %>" 
    DeleteCommand="DELETE FROM [DiaDiemTrungGian] WHERE [Id_DDTrungGian] = @Id_DDTrungGian" 
    InsertCommand="INSERT INTO [DiaDiemTrungGian] ([TenDiaDiem]) VALUES (@TenDiaDiem)" 
    SelectCommand="SELECT * FROM [DiaDiemTrungGian]" 
    UpdateCommand="UPDATE [DiaDiemTrungGian] SET [TenDiaDiem] = @TenDiaDiem WHERE [Id_DDTrungGian] = @Id_DDTrungGian">
    <DeleteParameters>
        <asp:Parameter Name="Id_DDTrungGian" Type="Int32" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="TenDiaDiem" Type="String" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="TenDiaDiem" Type="String" />
        <asp:Parameter Name="Id_DDTrungGian" Type="Int32" />
    </UpdateParameters>
</asp:SqlDataSource>
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="Label1" runat="server" ForeColor="Red"></asp:Label>
    <br />
    &nbsp;&nbsp;&nbsp; <strong style="color: #6666FF">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; THÊM ĐỊA ĐIỂM TRUNG GIAN</strong><br />
        <div class="khungnho">
            <table style="width: 100%; "0" cellspacing="0" align="center">
            <tr>
                <th bgcolor="#507DD2" colspan="3" style="color: #FFFFFF">
                    <br />
                    &nbsp;&nbsp;THÊM<br />
                    <br />
                </th>
            </tr>
            <tr>
                <td style="width: 243px">
                    &nbsp;</td>
                <td style="width: 27px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 243px" align="right">
                    Tên Địa Điểm&nbsp; </td>
                <td style="width: 27px">
                    &nbsp;</td>
                <td>
                    &nbsp;<asp:TextBox ID="txtdd" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtdd" ErrorMessage="Tên không được rỗng" 
                        ForeColor="Red">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 243px">
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                        ForeColor="#FF3300" />
                </td>
                <td style="width: 27px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 243px">
                    &nbsp;</td>
                <td style="width: 27px">
                    &nbsp;</td>
                <td>
                    <asp:Button ID="btnthem" runat="server" onclick="btnthem_Click" Text="Thêm" />
                </td>
            </tr>
            <tr>
                <td style="width: 243px">
                    &nbsp;</td>
                <td style="width: 27px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            </table>
        </div>
</form>
</asp:Content>
